import api from '../utils/axios'
import qs from 'qs'

import dataUtil from '../utils/dataUtil'

export default {

    /*获取学校列表*/
    getLwList: function (option, tag) {
        option = dataUtil.formatApiOption(option)
        return api.post(`api/v1/datasets/${tag ? 1069:1030}`, option).then((resp) => {
            return Promise.resolve(dataUtil.formatTableData(resp.data,option.pageNumber ,option.pageSize))
        })
    },

    /*获取指定学校ID信息*/
    getLwInfoById(id, dataId = 1030) {
        let option = {
            id: id
        }
        option = dataUtil.formatApiOption(option)
        return api.post(`api/v1/datasets/${dataId || 1030}`, option).then((resp) => {
            return Promise.resolve(dataUtil.formatTableData(resp.data).data[0])
        })
    },


}
